package com.tarena.lbs.message.dao.repository.impl;

import com.tarena.lbs.message.dao.mapper.TimingMsgTemplateMapper;
import com.tarena.lbs.message.dao.repository.TimingMsgRepository;
import com.tarena.lbs.message.pojo.po.TimingMsgTemplatePO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@RequiredArgsConstructor
public class TimingMsgRepositoryImpl implements TimingMsgRepository {
    private final TimingMsgTemplateMapper timingMsgTemplateMapper;
    @Override
    public List<TimingMsgTemplatePO> selectAll() {
        return timingMsgTemplateMapper.selectList(null);
    }
    @Override
    public void add(TimingMsgTemplatePO po) {
        timingMsgTemplateMapper.insert(po);
    }
    @Override
    public void update(TimingMsgTemplatePO po) {
        timingMsgTemplateMapper.updateById(po);
    }
    @Override
    public void delete(Integer id) {
        timingMsgTemplateMapper.deleteById(id);
    }
}
